"use strict";
/// <reference path = "./bean.ts" />
var work;
(function (work) {
    class Compete {
        fight(animal, human) {
            console.log(`${animal.name}和${human.name}进行了一场战斗！`);
            if (animal.height > human.height) {
                console.log(`${human.name}禽兽不如`);
            }
            else {
                console.log(`${human.name}比禽兽还厉害`);
            }
        }
        run(animal, human) {
            console.log(`${animal.name}和${human.name}比赛跑步！`);
            if (animal.age > human.age) {
                console.log(`${human.name}禽兽不如`);
            }
            else {
                console.log(`${human.name}比禽兽还厉害`);
            }
        }
        start() {
            let animal = new bean.Animal("老虎", 5, 200);
            let human = new bean.Human("武松", 20, 210);
            this.fight(animal, human);
            this.run(animal, human);
        }
    }
    work.Compete = Compete;
})(work || (work = {}));
let compete = new work.Compete();
compete.start();
